<template>
	<BillEditer @submit="submit"></BillEditer>
</template>

<script>
	import BillEditer from '@/components/bill-editer/index.vue'
	export default {
		components: {
			BillEditer,
		},
		data() {
			return {

			}
		},
		methods: {
			submit(data) {
				// 发送请求
				this.$api({
					method: 'post',
					url: '/system/billing/add',
					data: data
				}).then(res => {
					if (res.code == 0) {
						uni.switchTab({
							url: '/pages/index/index'
						})
					} else {
						this.$u.toast(res.msg);
						this.refresherrestore()
					}
				}).catch(err => {
					this.$u.toast("网络连接失败！");
				});
			}
		},
	}
</script>

<style lang="scss">

</style>
